package com.huluobo.a2204monthparkdemo.adapter

import com.blankj.utilcode.util.TimeUtils
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.huluobo.a2204monthparkdemo.R
import com.huluobo.base.bean.ParkingBeanItem
import java.text.SimpleDateFormat

/**
 *  Created by LC on 2024/9/4.
 */
class ParkingAdapter : BaseQuickAdapter<ParkingBeanItem, BaseViewHolder>(R.layout.item_parking) {
    override fun convert(helper: BaseViewHolder, item: ParkingBeanItem) {
        helper.setText(R.id.item_parking_id_tv, "车位id:${item.parkId}")
        helper.setText(R.id.item_parking_name_tv, "车位名称:${item.parkName}")
//        val time = TimeUtils.millis2String(item.parkTime.toLong(), SimpleDateFormat("MM-dd"))
        helper.setText(R.id.item_parking_time_tv, "车位时间:${item.parkTime}")
    }
}